using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Net;

namespace BarnBuddyClient
{
    class HttpUtility
    {
        public static string bytes2String(Byte[] bytes)
        {
            return System.Text.Encoding.Default.GetString(bytes);
        }

        public static Hashtable extractPostData(string postStr) {
            Hashtable postParams = new Hashtable();

            string[] sa1 = postStr.Split('&');
            foreach (string p in sa1)
            {
                string[] sa2 = p.Split('=');
                if (sa2.Length == 2)
                {
                    postParams[sa2[0]] = sa2[1];
                }
            }
            return postParams;
        }
    }
}
